/*
* Copyright (C) 2020 ~ 2024 chaigec All Rights Reserved.
*
* Author:     chaigec <chaigec@163.com>
* Maintainer: chaigec <chaigec@163.com>

 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
*/

#include "MkUtil/MkPtzCommand.h"
#include <gtest/gtest.h>


TEST(MkPtzCommand, PtzCmdTest)
{
    MkPtzCommand PtzCmd = MkPtzStop;
    Uint32 ErrorCode = CMkPtzCommand::GetIntance().GetPtzCommand("aaa", PtzCmd);
    EXPECT_NE(ErrorCode, NoneError);

    MkString StrCmd;
    ErrorCode = CMkPtzCommand::GetIntance().GetStrPtzCommand(MkPtzCommand(0xFF), StrCmd);
    EXPECT_NE(ErrorCode, NoneError);

    ErrorCode = CMkPtzCommand::GetIntance().GetPtzCommand("PtzLeftUp", PtzCmd);
    EXPECT_EQ(ErrorCode, NoneError);
    EXPECT_EQ(MkPtzLeftUp, PtzCmd);

    ErrorCode = CMkPtzCommand::GetIntance().GetStrPtzCommand(MkPtz3DZoom, StrCmd);
    EXPECT_EQ(ErrorCode, NoneError);
    EXPECT_STREQ("Ptz3DZoom", StrCmd.c_str());
}